package com.yunshan.mp.service.impl;

import java.util.List;
import com.yunshan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yunshan.mp.mapper.WechatFeedbackMapper;
import com.yunshan.mp.domain.WechatFeedback;
import com.yunshan.mp.service.IWechatFeedbackService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author yunshan
 * @date 2025-04-18
 */
@Service
public class WechatFeedbackServiceImpl implements IWechatFeedbackService 
{
    @Autowired
    private WechatFeedbackMapper wechatFeedbackMapper;

    /**
     * 查询意见反馈
     * 
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public WechatFeedback selectWechatFeedbackById(Long id)
    {
        return wechatFeedbackMapper.selectWechatFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param wechatFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<WechatFeedback> selectWechatFeedbackList(WechatFeedback wechatFeedback)
    {
        return wechatFeedbackMapper.selectWechatFeedbackList(wechatFeedback);
    }

    /**
     * 新增意见反馈
     * 
     * @param wechatFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertWechatFeedback(WechatFeedback wechatFeedback)
    {
        wechatFeedback.setCreateTime(DateUtils.getNowDate());
        return wechatFeedbackMapper.insertWechatFeedback(wechatFeedback);
    }

    /**
     * 修改意见反馈
     * 
     * @param wechatFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateWechatFeedback(WechatFeedback wechatFeedback)
    {
        wechatFeedback.setUpdateTime(DateUtils.getNowDate());
        return wechatFeedbackMapper.updateWechatFeedback(wechatFeedback);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param ids 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWechatFeedbackByIds(Long[] ids)
    {
        return wechatFeedbackMapper.deleteWechatFeedbackByIds(ids);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param id 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWechatFeedbackById(Long id)
    {
        return wechatFeedbackMapper.deleteWechatFeedbackById(id);
    }
}
